//
//  ProjectEnvironmentManager.h
//  ProjectEnvironmentManager
//
//  Created by admin on 2022/7/18.
//

#import <Foundation/Foundation.h>
#import "EnvironmentModel.h"
#import "ProjectEnvironmentDelegate.h"

NS_ASSUME_NONNULL_BEGIN

static NSString *CY_ENVIRONMENT_LOAD_FINISH_NOTIFICATION_NAME = @"CY_ENVIRONMENT_LOAD_FINISH_NOTIFICATION_NAME";
static NSString *CY_ENVIRONMENT_WILL_CHANGE_NOTIFICATION_NAME = @"CY_ENVIRONMENT_WILL_CHANGE_NOTIFICATION_NAME";
static NSString *CY_ENVIRONMENT_DID_CHANGE_NOTIFICATION_NAME = @"CY_ENVIRONMENT_DID_CHANGE_NOTIFICATION_NAME";

#define ENVIRONMENT_DELEGATE delegate:(id<ProjectEnvironmentDelegate>)delegate;

@interface ProjectEnvironmentManager : NSObject

+ (void)loadManagerWithEnvironmentList:(NSArray<EnvironmentModel *> *)modelList;
+ (void)loadManagerWithEnvironmentList:(NSArray<EnvironmentModel *> *)modelList ENVIRONMENT_DELEGATE;

/**
 * 当前是否支持切换服务器环境, 目前只有App store 不支持
 * @return
 */
+ (BOOL)isSupportExchange;
/**
 * 当前的服务器环境模型
 * @return
 */
+ (EnvironmentModel *)currentEnvironment;
/**
 * 进行服务切换
 */
+ (void)exchangeEnvironmentAction;
@end

NS_ASSUME_NONNULL_END
